Non-volatile memory systems, such as flash memory, have been widely adopted for use in consumer products. Flash memory may be found in different forms, for example in the form of a portable memory card that can be carried between host devices or as a solid state disk (SSD) embedded in a host device. When writing data to a conventional flash memory system, a host typically writes data to, and reads data from, addresses within a logical address space of the memory system. The memory system then commonly maps data between the logical address space and the physical blocks or metablocks of the memory, where data is stored in fixed logical groups corresponding to ranges in the logical address space. Generally, each fixed logical group is stored in a separate physical block of the memory system. The memory system keeps track of how the logical address space is mapped into the physical memory but the host is unaware of this. The host keeps track of the addresses of its data files within the logical address space but the memory system generally operates without knowledge of this mapping.
A drawback of memory systems that operate in this manner is fragmentation. For example, data written to a solid state disk (SSD) drive in a personal computer (PC) operating according to the NTFS file system is often characterized by a pattern of short runs of contiguous addresses at widely distributed locations within the logical address space of the drive. Even if the file system used by a host allocates sequential addresses for new data for successive files, the arbitrary pattern of deleted or updated files causes fragmentation of the available free memory space such that it cannot be allocated for new file data in blocked units.
The deletion or updating of files by the host may cause some data in a physical block in the memory system to become obsolete, resulting in partially obsolete blocks that contain both valid and obsolete data. These physical blocks partially filled with obsolete data represent memory capacity that cannot be used until the valid data in the block is moved to another block so that the original block may be erased and made available for receiving more data. The process of moving the valid data into another block and preparing the original block for receiving new data is sometimes referred to as a housekeeping function or garbage collection. As a memory system accumulates obsolete blocks, e.g., blocks partially filled with obsolete data, those blocks are unavailable for receiving new data. When enough of the obsolete blocks accumulate, the memory device may be unable to service requests from the host and housekeeping functions may be necessary.
The write performance of a memory device is generally specified by two numbers. The first number is the burst write speed. Burst write speed is the rate at which the memory device can absorb an input stream of data when there is enough room in the memory device. The burst write speed may vary depending on a requested level of service defined for the data being written. The second number is the sustained write speed. Sustained write speed is the rate at which the memory device can absorb streams of input data that are much larger than the available write blocks.
A typical factor influencing when to initiate housekeeping functions such as garbage collection is whether the host interface is idle or active. Memory devices may perform garbage collection in the background, when the host interface is idle, or in the foreground, when the host interface is active. The host interface may be idle when no read or write commands are received from the host. A background garbage collection function may operate when the host interface is idle, and may be disabled when the host interface becomes active. Background garbage collection generally does not affect the sustained write speed and does not limit the ability of the memory device to burst write data at maximum speed. On the other hand, the host interface may be active when a read or write command is received from the host. A foreground garbage collection function may operate when the host interface is active and may thus reduce the sustained write speed. The burst write speed, the sustained write speed, the life of the memory device, and other memory device parameters may be affected by the garbage collection or other housekeeping operation.